package artibella.media.controls.ui 
{
	import artibella.text.StylesManager;
	import flash.display.BlendMode;
	import flash.display.JointStyle;
	import flash.display.LineScaleMode;
	import flash.display.MovieClip;
	import flash.text.TextField;
	import flash.text.TextFormat;
	
	/**
	 * ...
	 * @author pbordachar
	 */
	
	public class InfoButton extends MovieClip
	{
		private var _clr:int;
		
		public function InfoButton( c:int = 0x000000 ) 
		{
			_clr = c;
			
			_init();
		}
		
		private function _init():void
		{
			buttonMode = true;
			blendMode = BlendMode.LAYER;
			
			drawInfo();
		}
		
		// - - -
		
		public function drawInfo():void
		{
			graphics.clear();
			
			graphics.beginFill( _clr, 1 );
			graphics.drawCircle( 0, 0, 5 );
			graphics.endFill();
			
			var chp:TextField = new TextField();
			chp.defaultTextFormat = StylesManager.instance.getStyleFormat( ".player_info_button" );
			chp.embedFonts = true;
			chp.autoSize = "left";
			chp.wordWrap = false;
			chp.multiline = false;
			chp.selectable = false;
			chp.htmlText = "<b>i</b>";
	
			chp.x = - chp.width / 2;
			chp.y = - chp.height / 2;
			
			chp.mouseEnabled = false;
			//chp.blendMode = BlendMode.ERASE;
			
			addChild( chp );
		}
	}

}